img[src=""] {
  opacity: 0;
}

taro-image-core {
  display: inline-block;
  overflow: hidden;
  position: relative;
  width: auto;
  height: auto;
  font-size: 0;
}

.taro-img {
  &.taro-img__widthfix {
    height: 100%;
  }

  &__mode {
    &-scaletofill {
      width: 100%;
      height: 100%;
    }

    &-aspectfit {
      max-width: 100%;
      max-height: 100%;
    }

    &-aspectfill {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);

      &--width {
        min-width: 100%;
        height: 100%;
      }

      &--height {
        width: 100%;
        min-height: 100%;
      }
    }

    &-widthfix {
      width: 100%;
    }

    &-heightfix {
      height: 100%;
    }

    &-top {
      width: 100%;
    }

    &-bottom {
      position: absolute;
      bottom: 0;
      width: 100%;
    }

    &-left {
      height: 100%;
    }

    &-right {
      position: absolute;
      right: 0;
      height: 100%;
    }

    // &-topleft {
    // }

    &-topright {
      position: absolute;
      right: 0;
    }

    &-bottomleft {
      position: absolute;
      bottom: 0;
    }

    &-bottomright {
      position: absolute;
      right: 0;
      bottom: 0;
    }
  }
}
